<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@page import="java.util.Random"%>
<%@page import="com.jiuqi.bi.chartpro.chart.linebox.LineBoxChartModel"%>
<%@page import="com.jiuqi.bi.chartpro.chart.linebox.BarSeries"%>
<%@page import="com.jiuqi.bi.chartpro.chart.linebox.LineBoxChart"%>
<%@page import="com.jiuqi.bi.chartpro.chart.linebox.LineSeries"%>
<%@page import="com.jiuqi.bi.chartpro.common.LineType"%>
<%@page import="com.jiuqi.bi.chartpro.chart.axes.ValueAxis"%>
<%@page import="com.jiuqi.bi.chartpro.common.Alignment"%>
<%@page import="com.jiuqi.bi.chartpro.common.Shape"%>
<%@page import="com.jiuqi.bi.chartpro.common.Effect"%>
<%@page import="com.jiuqi.bi.chartpro.common.BGColor"%>
<%@page import="com.jiuqi.bi.chartpro.common.DataSymbol"%> 
<%@page import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css">
<link href="<%=request.getContextPath()%>/css/table.css" rel="stylesheet" type="text/css">
</head>
<body style="background-color: #ffffff">
<table width="100%" height="100%"  border="0" align="center" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
	<!-- 位置导航栏 -->
	<tr height="25px">
		<td width="100%" align="center" valign="top">
			 <table width="98%" border="0" cellpadding="0" cellspacing="0" class="tabtitle">
              <tr>
                <td width="4%" valign="top"><img src="../img/pic_dot1.gif" width="37" height="22"></td>
                <td width="96%" valign="middle">当前位置：<a  class="n">远程环境监测</a> &gt;&gt; <a  class="n">实时监控</a></td>
              </tr>
            </table>
		</td>
	</tr>
   
   <!-- 查询工具条 -->
   <tr height="29px">
	   <td valign="top">
	   		<table width="98%" height="29" cellpadding="0" cellspacing="0" align="center" border="0">
	   			<tr height="100%">
		   			<td class="td_title" width="250px" align="left">
		   				<table cellpadding="0" cellspacing="0" border="0">
		   					<tr>
		   						<td align="center" width="70px">年:</td>
		   						<td width="150px">
		   							<span class="treeSpan" onclick="" treeSelect="true">
		   							  	    <select style="width: 150px;">
							  				 <%
							  				 	for(int i = 2009; i <= 2011; i++){
							  				 %>
							  				 	<option><%=i %></option>
							  				 <%		
							  				 	}
							  				 %>
							  				</select>
									</span>
		   						</td>
		   					</tr>
		   				</table>
		   			</td>
		   			<td class="td_title" width="250px" align="left">
		   				<table cellpadding="0" cellspacing="0" border="0">
		   					<tr>
		   						<td align="center" width="70px">月:</td>
		   						<td width="150px">
		   							<span class="treeSpan"  treeSelect="true">
		   							  	    <select style="width: 150px;">
							  				 <%
							  				 	for(int i = 1; i <= 12; i++){
							  				 %>
							  				 	<option><%=i %></option>
							  				 <%		
							  				 	}
							  				 %>
							  				</select>
									</span>
		   						</td>
		   					</tr>
		   				</table>
		   			</td>
		   			<td class="td_title" width="250px" align="left">
		   				<table cellpadding="0" cellspacing="0" border="0">
		   					<tr>
		   						<td align="center" width="70px">日:</td>
		   						<td width="150px">
		   							<span class="treeSpan"  treeSelect="true">
		   							  	    <select style="width: 150px;">
							  				 <%
							  				 	for(int i = 1; i <= 30; i++){
							  				 %>
							  				 	<option><%=i %></option>
							  				 <%		
							  				 	}
							  				 %>
							  				</select>
									</span>
		   						</td>
		   					</tr>
		   				</table>
		   			</td>
		   			<td  class="td_title" align="center">
							<input name="Button12" type="button" class="button_cx" value="" title="查询" onclick="search();">
					</td>
	   			</tr>
	   		</table>
	   </td>
   </tr>
  </table>
<%
	LineBoxChartModel lineBoxModel=new LineBoxChartModel(600,400);
	lineBoxModel.setTitle("混合气体实时浓度监控");
	lineBoxModel.getLegend().setPosition(Alignment.Top);
	lineBoxModel.setHeight(400);
	lineBoxModel.setWidth(1020);
	lineBoxModel.getValueAxes()[0].setDecimal(3);
	lineBoxModel.setShowLegend(true);
	lineBoxModel.setShowTable(true);
	lineBoxModel.getValueAxes()[0].setTitle("浓度");
	lineBoxModel.getCategoryAxis().setLabels(new String[]{
			"01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00",
			"10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00",
			"20:00","21:00","22:00","23:00","24:00"
			});
	
	//添加直方序列1
	LineSeries series1=new LineSeries("二氧化碳");
	series1.setLineType(LineType.Curve); 
	series1.setDataSymbolSize(0);
	series1.setColor(0xff0000);
	series1.setData(new double[]{ 0.681, 1.132, 1.781, 1.679, 1.278, 0.551,
			1.365, 1.768, 1.217, 1.369, 0.797, 0.140, 1.837, 1.292, 0.537,
			0.336, 1.277, 1.501, 1.895, 0.246, 0.219, 1.438, 1.110, 0.375 });
	//添加直方序列2
	LineSeries series2=new LineSeries("一氧化碳");
	series2.setLineType(LineType.Curve); 
	series2.setDataSymbolSize(0);
	series2.setColor(0x8b09f9);
	series2.setData(new double[]{ 1.490, 0.612, 1.914, 1.246, 1.608, 0.399,
			1.608, 1.916, 0.758, 0.163, 0.534, 1.419, 0.063, 0.718, 0.537,
			1.311, 1.793, 0.604, 0.668, 0.686, 1.589, 0.561, 0.070, 1.606 });
	//添加直方序列3
	LineSeries series3=new LineSeries("氮气");
	series3.setLineType(LineType.Curve); 
	series3.setDataSymbolSize(0);
	series3.setColor(0x00ff00);
	series3.setData(new double[]{ 0.431, 0.254, 0.451, 1.733, 0.208, 0.911,
			0.294, 1.014, 1.106, 0.222, 0.630, 1.522, 1.886, 0.979, 1.231,
			0.644, 0.187, 0.902, 1.434, 0.640, 0.405, 1.852, 1.859, 1.368 });
	//添加直方序列3
	LineSeries series4=new LineSeries("甲烷");
	series4.setLineType(LineType.Curve); 
	series4.setDataSymbolSize(0);
	series4.setColor(0x0000ff);
	series4.setData(new double[]{ 3.555, 1.639, 0.444, 2.733, 1.408, 3.111,
			1.394, 1.554, 1.006, 0.722, 0.930, 1.222, 2.886, 2.979, 0.231,
			0.744, 1.187, 1.902, 0.434, 0.140, 0.805, 2.852, 2.859, 1.968 });
	
	
	lineBoxModel.addSeries(series1);
	lineBoxModel.addSeries(series2);
	lineBoxModel.addSeries(series3);
	lineBoxModel.addSeries(series4);
	
	LineBoxChart  lineBox=new LineBoxChart(lineBoxModel);
	
	byte[] imageBytes=lineBox.buildChart();
	request.getSession().setAttribute("chart",imageBytes);
 %>
 <jsp:include page="topbar.jsp" >
	<jsp:param name="title" value="当月输出电流波动折线图"/>
</jsp:include>
</body>
</html>